﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PPIDesktopClient.Entities;
using PPIDesktopClient.General;
using PPIProxy;

namespace PPIDesktopClient.Logic
{
    public class LUtility_Asset_XMissionStructure_Pole
    {
        public static int Insert(EUtility_Asset_XMissionStructures_Pole pole)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            return WUtility_Asset_XMissionStructure_Pole.Insert(pole.Asset.Id, pole.TopType.XMissionStructures_PoleTopTypeId, pole.Species.XMissionStructures_PoleSpeciesId, pole.Treatment.XMissionStructures_PoleTreatmentId, pole.Year, pole.Class.XMissionStructures_PoleClassId, pole.Latitude, pole.Longitude, pole.Altitude, pole.SatelliteCount, pole.SatelliteTime, pole.AID, pole.LVisit, pole.Number, pole.Length, pole.LVisitor, pole.SolutionAvailable,_Reader.GetConnectionString());
        }

        public static void Update(EUtility_Asset_XMissionStructures_Pole pole)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            WUtility_Asset_XMissionStructure_Pole.Update(pole.Id,pole.Asset.Id, pole.TopType.XMissionStructures_PoleTopTypeId, pole.Species.XMissionStructures_PoleSpeciesId, pole.Treatment.XMissionStructures_PoleTreatmentId, pole.Year, pole.Class.XMissionStructures_PoleClassId, pole.Latitude, pole.Longitude, pole.Altitude, pole.SatelliteCount, pole.SatelliteTime, pole.AID, pole.LVisit, pole.Number, pole.Length, pole.LVisitor, pole.SolutionAvailable,_Reader.GetConnectionString());
        }

        public static void Delete(int poleId)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            WUtility_Asset_XMissionStructure_Pole.Delete(poleId,_Reader.GetConnectionString());
        }

    }
}
